﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Oragon.Architecture.Data.SqlBuilder;
using Oragon.Architecture.Data.SqlBuilder.Operators;
using Oragon.Architecture.Data.QueryBuilder.SqlServer;
namespace Oragon.Architecture.Data.QueryBuilder.Tests
{
	[TestFixture]
	public class ILiteralBuilderTests
	{

		[Test]
		public void BuildColumnNameTest_1()
		{
			string resultado = LiteralManager.GetLiteralBuilder().BuildColumnName("abc.abc").Value;
			string esperado = "[abc].[abc]";
			Assert.AreEqual(esperado, resultado);
		}
		[Test]
		public void BuildColumnNameTest_2()
		{
			string resultado = LiteralManager.GetLiteralBuilder().BuildColumnName("1", "2", "3").Value;
			string esperado = "[1].[2].[3]";
			Assert.AreEqual(esperado, resultado);
		}
		[Test]
		public void BuildDateTest_1()
		{
			string resultado = LiteralManager.GetLiteralBuilder().BuildDate(new DateTime(2009, 01, 12, 18, 33, 10)).Value;
			string esperado = "2009-01-12";
			Assert.AreEqual(esperado, resultado);
		}
		[Test]
		public void BuildDateTimeTest_1()
		{
			string resultado = LiteralManager.GetLiteralBuilder().BuildDateTime(new DateTime(2009, 01, 12, 18, 33, 10)).Value;
			string esperado = "2009-01-12 18:33:10";
			Assert.AreEqual(esperado, resultado);
		}
		[Test]
		public void BuildIntTest_1()
		{
			string resultado = LiteralManager.GetLiteralBuilder().BuildInt(2).Value;
			string esperado = "2";
			Assert.AreEqual(esperado, resultado);
		}

	}
}
